import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
    state: {
        userInfo: {},
        menuList: [
            {
                menu_id: 1,
                name: '系统设置',
                url: '/merchant',
                icon:'el-icon-s-shop',
                redirect: '/merchant/verify',
                children: [{
                    menu_id: 5,
                    name: '菜单管理',
                    url: '/merchant/verify',
                }, {
                    menu_id: 6,
                    name: '组织架构',
                    url: '/merchant/list',
                }],
            }, {
                menu_id: 2,
                name: '营销管理',
                url: '/market',
                icon:'el-icon-discount',
                redirect: '/market/coupon',
                children: [
                //     {
                //     menu_id: 7,
                //     name: '优惠券监控',
                //     url: '/market/coupon',
                // },
                {
                    menu_id: 8,
                    name: '电票监管',
                    url: '/market/ticket',
                },{
                    menu_id: 9,
                    name: '电票领取明细',
                    url: '/market/ticketDetails',
                }],
            }, {
                menu_id: 3,
                name: '财务管理',
                url: '/finance',
                icon:'el-icon-bank-card',
                redirect: '/finance/paymentRecord',
                children: [{
                    menu_id: 9,
                    name: '支付记录',
                    url: '/finance/paymentRecord',
                }, {
                    menu_id: 10,
                    name: '分账明细',
                    url: '/finance/ledgerDetails',
                }, {
                    menu_id: 11,
                    name: '结算记录',
                    url: '/finance/settlementRecord',
                }],
            }, {
                menu_id: 4,
                name: '系统设置',
                url: '/system',
                icon:'el-icon-setting',
                redirect: '/system/settlementConfig',
                children: [
                    // {
                    //     menu_id:13,
                    //     name:'结算配置',
                    //     url:'/system/settlementConfig',
                    // },
                    {
                        menu_id: 14,
                        name: '管理员管理',
                        url: '/system/operatorManage',
                    }
                ],
            }
        ],
        mchType:{
            10:'个人',
            11:'个体工商户',
            12:'企业'
        },
    },
    getters: {},
    mutations: {
        // 设置用户登录信息
        setUserInfo(state, value) {
            state.userInfo = value;
        },
    },
    actions: {},
    modules: {}
})
